home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / doc / quel / view.doc < prev   
Encoding:
Text File  |  1992-11-19  |  1.7 KB  |  47 lines

  1.  
  2.  
  3.  
  4.  
  5.      VIEW(QUEL)                   2/7/79                    VIEW(QUEL)
  6.  
  7.  
  8.  
  9.      NAME
  10.           view - define a virtual relation
  11.  
  12.      SYNOPSIS
  13.           _d_e_f_i_n_e _v_i_e_w name (target-list) [ _w_h_e_r_e qual ]
  14.  
  15.      DESCRIPTION
  16.           The syntax of the _v_i_e_w statement is almost identical to  the
  17.           _r_e_t_r_i_e_v_e  _i_n_t_o statment; however, the data is not retrieved.
  18.           Instead, the definition is stored.  When the  relation  _n_a_m_e
  19.           is  later used, the query is converted to operate on the re-
  20.           lations specified in the _t_a_r_g_e_t-_l_i_s_t.
  21.  
  22.           All forms of retrieval on the view are fully supported,  but
  23.           only  a  limited  set  of  updates  are supported because of
  24.           anomolies which can appear.  Almost no updates are supported
  25.           on  views which span more than one relation.  No updates are
  26.           supported that affect a domain in the qualification  of  the
  27.           view or that affect a domain which does not translate into a
  28.           simple attribute.
  29.  
  30.           In general, updates are supported if and only if it  can  be
  31.           guaranteed  (without  looking  at  the actual data) that the
  32.           result of updating the view is identical to that of updating
  33.           the corresponding real relation.
  34.  
  35.           The person who defines a view must own  all  relations  upon
  36.           which the view is based.
  37.  
  38.      EXAMPLE
  39.           range of e is employee
  40.           range of d is dept
  41.           define view empdpt (ename = e.name, e.sal, dname = d.name)
  42.                   where e.mgr = d.mgr
  43.  
  44.      SEE ALSO
  45.           retrieve(quel), destroy(quel)
  46.  
  47.